<template>
  <canvas id="container"></canvas>
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue';
import Scene from './Scene/Scene';
import GltfParser from '@/util/Gltf/GLTFParser'
onMounted(() => {
  let container = document.getElementById("container") as HTMLCanvasElement;
  let scene = new Scene(container);
  fetch('./triangle.json').then((res) => res.json()).then((data) => {
    let gltfParse = new GltfParser(data);
    let vertices = gltfParse.getVertices(0)
    let indeices = gltfParse.getIndices(0)
    // console.log(indeices, vertices);
  });
})
</script>

<style scoped>
#container {
  width: 812px;
  height: 812px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: black;
}
</style>